package com.example.wanglong.myoneapplication.reparentclass;

import android.app.Activity;
import android.widget.Toast;

/**
 * Created by wang.long on 2016/3/29.
 */
public class ReToast {

    private static Toast mToast;


    public static void showToast(String text,Activity activity){
        if(mToast==null){
            mToast=Toast.makeText(activity,text,Toast.LENGTH_SHORT);
        } else {
            mToast.setText(text);
            mToast.setDuration(Toast.LENGTH_SHORT);
        }
        mToast.show();

    }




}
